<#import "/macro.ftl" as m>
<@m.page_header title='后台' />
<script type="text/javascript" src="/assets/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/assets/ueditor/ueditor.all.js"></script>
<script type="text/javascript" src="/assets/ueditor/lang/zh-cn/zh-cn.js"></script>
<div id="page-content-wrapper">

    <div id="page-title">
        <h3>
        产品预售通知
        </h3>
    </div>

    <div class="pad10A">
    
    <form id="demo-form1" action="/products/saleNotify" class="col-md-12" method="POST">   
        <div class="form-row">共计${count}个号码</div>
        
        <div class="form-row">
            <div class="form-label col-md-2">
                <label for="">
                    内容:<span class="required">*</span>
                </label>
            </div>
            <script language="javascript">
			function countChar(){
				document.getElementById('counter').innerHTML=document.getElementById('conhtml').value.length;
			}
			</script>
            <div>已经输入<span id="counter">0</span>字</div>
            <div class="content-box bg-white post-box col-md-8">
                <textarea name="content" value='内容' id="conhtml" onkeydown="countChar()";></textarea>
            </div>
        </div>
    </form>


    <div class="form-row">
        <div class="form-input col-md-10 col-md-offset-2">
            <a href="javascript:;" class="btn medium primary-bg radius-all-4 col-md-2" id="demo-form-2-valid">
                提交
            </a>
        </div>
    </div>
	<div class="divider"></div>
	<script>
	$("#demo-form-2-valid").click(function () {

        if ($("#conhtml").val() == "") {
            alert("内容不能为空");
            return false;
        }
		if(confirm('确定发送通知吗')){
			$('#demo-form1').trigger('submit');
		}
    	
    	return;
    });
	</script>
	
</div>

